import request from '@/utils/request'

// 查询揭榜挂帅列表(大屏接口)
export function detailTopByStage(query) {
  return request({
    url: '/partybuilding/ReleaseTask/detailTopByStage',
    method: 'get',
    params: query
  })
}

// 查询揭榜挂帅列表
export function listReleaseTask(query) {
  return request({
    url: '/partybuilding/ReleaseTask/myList',
    method: 'get',
    params: query
  })
}

// 查询揭榜挂帅列表(攻榜)
export function listBeatTask(query) {
  return request({
    url: '/partybuilding/ReleaseTask/records',
    method: 'get',
    params: query
  })
}

// 查询揭榜挂帅详细
export function getReleaseTask(id) {
  return request({
    url: '/partybuilding/ReleaseTask/' + id,
    method: 'get'
  })
}

// 新增揭榜挂帅
export function applyFor(data) {
  return request({
    url: '/partybuilding/ReleaseTask/applyFor',
    method: 'post',
    data: data
  })
}

// 修改揭榜挂帅
export function updateReleaseTask(data) {
  return request({
    url: '/partybuilding/ReleaseTask/edit',
    method: 'post',
    data: data
  })
}

// 提交审核揭榜挂帅
export function submitReleaseTask(data) {
  return request({
    url: '/partybuilding/ReleaseTask/submit',
    method: 'post',
    data: data
  })
}

// 删除揭榜挂帅
export function delReleaseTask(id) {
  return request({
    url: '/partybuilding/ReleaseTask/remove/' + id,
    method: 'post'
  })
}

// 审批揭榜挂帅
export function approval(data) {
  return request({
    url: '/partybuilding/ReleaseTask/approval',
    method: 'post',
    data: data
  })
}

// 发榜
export function publishTask(data) {
  return request({
    url: '/partybuilding/ReleaseTask/publish',
    method: 'post',
    data: data
  })
}

// 揭榜
export function acceptTask(data) {
  return request({
    url: '/partybuilding/ReleaseTask/acceptTask',
    method: 'post',
    data: data
  })
}

// 添加攻榜记录
export function addRecord(data) {
  return request({
    url: '/partybuilding/ReleaseTask/addRecord',
    method: 'post',
    data: data
  })
}

// 完成攻榜
export function finishTask(data) {
  return request({
    url: '/partybuilding/ReleaseTask/done',
    method: 'post',
    data: data
  })
}

// 评榜
export function reviewTask(data) {
  return request({
    url: '/partybuilding/ReleaseTask/review',
    method: 'post',
    data: data
  })
}

// 奖榜
export function reward(data) {
  return request({
    url: '/partybuilding/ReleaseTask/reward',
    method: 'post',
    data: data
  })
}

// 用榜
export function usage(data) {
  return request({
    url: '/partybuilding/ReleaseTask/usage',
    method: 'post',
    data: data
  })
}
